
<?php include 'inc/widget_head.php';?>


<!-- 登录页专用样式 -->
<style type="text/css">
.login-form {
    background: #2b2b36;
    position: relative;
    width: 30%;
    margin: 3% auto 0 auto;
    text-align: center;
    border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -o-border-radius: 15px;
}
.head-info {
    padding: 5px 0;
    text-align: left;
    font-size: 1.0em;
    color: #999;
    background: #23232e;
    height: 50px;
    border-top-left-radius: 10px;
    -webkit-border-top-left-radius: 10px;
    -moz-border-top-left-radius: 10px;
    -o-border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    -webkit-border-top-right-radius: 10px;
    -moz-border-top-right-radius: 10px;
    -o-border-top-right-radius: 10p
}
input[type="text"] {
    width: 70%;
    padding: 1em 2em 1em 3em;
    color: #9199aa;
    font-size: 18px;
    outline: none;
    background: url(/statics/imgs/login/adm.png) no-repeat 10px 15px;
    border: none;
    font-weight: 100;
    border-bottom: 1px solid#484856;
    margin-top: 2em;
}
input[type="password"] {
    width: 70%;
    padding: 1em 2em 1em 3em;
    color: #dd3e3e;
    font-size: 18px;
    outline: none;
    background: url(/statics/imgs/login/key.png) no-repeat 10px 23px;
    border: none;
    font-weight: 100;
    border-bottom: 1px solid#484856;
    margin-bottom: 3em;
}
input[type="submit"] {
    font-size: 20px;
    color: #fff;
    outline: none;
    border: none;
    background: #3ea751;
    width: 100%;
    padding: 18px 0;
    border-bottom-left-radius: 15px;
    -webkit-border-bottom-left-radius: 15px;
    -moz-border-bottom-left-radius: 15px;
    -o-border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    -webkit-border-bottom-right-radius: 15px;
    -moz-border-bottom-right-radius: 15px;
    -o-border-bottom-right-radius: 15px;
    cursor: pointer;
}
input[type="submit"]:hover {
    background: #ff2775;
    border-bottom-left-radius: 15px;
    -webkit-border-bottom-left-radius: 15px;
    -moz-border-bottom-left-radius: 15px;
    -o-border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    -webkit-border-bottom-right-radius: 15px;
    -moz-border-bottom-right-radius: 15px;
    -o-border-bottom-right-radius: 15px;
    transition: 1s all;
    -webkit-transition: 1s all;
    -moz-transition: 1s all;
    -o-transition: 1s all;
}
label.lbl-1 {
    background: #6756ea;
    width: 20px;
    height: 20px;
    display: block;
    float: right;
    border-radius: 50%;
    margin: 16px 10px 0px 0px;
}
label.lbl-2 {
    background: #ea569a;
    width: 20px;
    height: 20px;
    display: block;
    float: right;
    border-radius: 50%;
    margin: 16px 10px 0px 0px;
}
label.lbl-3 {
    background: #f1c85f;
    width: 20px;
    height: 20px;
    display: block;
    float: right;
    border-radius: 50%;
    margin: 16px 10px 0px 0px;
}
.avtar img {
    margin: 1.1em 0 0;
}

</style>

<link href="/statics/favicon.ico" rel="SHORTCUT ICON" />

<body style="background: url('/statics/imgs/bg/3.jpg') no-repeat;">




<div class="login-form" style="opacity:0.5;margin-top:120px;">


    <div class="head-info">
        <!-- <div style="float: left;margin: 15px 20px">教师登录</div> -->
        <label class="lbl-1"></label>
        <label class="lbl-2"></label>
        <label class="lbl-3"></label>
    </div>
    <div class="clear"></div>
    <div class="avtar">
        <a href='/index/index/' title="返回首页"><img src="/statics/imgs/login/apple.png"/></a>
    </div>
    <form class="layui-form">
        <input type="text" name='username' class="text" placeholder='请输入账号' value='' />
        <input type="password" name='password' placeholder='请输入密码' value='' />
        <div class="signin">
            <input type="submit" lay-submit lay-filter="sub" value="教 师 登 录">
        </div>
    </form>

</div>


<script language="JavaScript">
    layui.use(['form', 'element'], function () {
        let $ = layui.$,
            form = layui.form;

        form.on('submit(sub)', function (data) {
            $.post('/index/login',data.field,function(r){
                if(r!=='成功'){
                    layer.msg('账号与密码不匹配，请检查。');
                }else{
                   window.location.reload();
                }
            });
            return false; //阻止表单跳转
        });
    });
</script>

<!-- 加入闪现消息 -->
<?php include 'inc/widget_flashMsg.php';?>

</body>
</html>